<?php
/**
 * User Details
 *
 * @package bbPress
 * @subpackage Freshine
 * @since Freshine 1.1.0
 */
?>

	<div id="entry-author-info" class="clearfix">
		<div id="author-avatar">

			<?php echo get_avatar( bbp_get_displayed_user_field( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 80 ) ); ?>

		</div><!-- #author-avatar -->
		<div id="author-description">
			<h1><?php if(bbp_is_single_user_edit()) echo 'Edit profile '; ?><?php echo bbp_get_displayed_user_field( 'display_name' ); ?></h1>
			
			<?php if ( bbp_is_user_home() && current_user_can( 'edit_users' ) && !bbp_is_single_user_edit() ) : ?>

			<span class="edit_user_link"><a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( __( 'Edit Profile of User %s', 'bbpress' ), esc_attr( bbp_get_displayed_user_field( 'display_name' ) ) ); ?>"><?php _e( 'Edit Profile', 'bbpress' ); ?></a></span>

			<?php endif; ?>

			<div class="clear">
				<?php echo bbp_get_displayed_user_field( 'description' ); ?>
				<br />
				<div class="clearfix">
				<?php $user_info = get_userdata(bbp_get_user_id()); ?>
				<span class="user_url"><a href="<?php echo $user_info->user_url; ?>" rel="nofollow" target="_blank"><?php echo $user_info->user_url; ?></a></span>
				</div>
			</div>

		</div><!-- #author-description	-->
	</div><!-- #entry-author-info -->
